import {ADDPERSON} from '../Action/ActionTypes'
const initstore=[{id:"001",name:'Tom',age:"18"}]
export default function Person(state=initstore,action){
  const{type,data}=action
  switch(type){
    case ADDPERSON:
      return [data,...state]
    default:
      return state  
  }
}